package liu.per.jvms;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by liuj on 2015/4/19.
 * -verbose:gc -Xms20m -Xmx20m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:-PrintGCDetails
 */
public class TestGC {

    static class Obj{
        private byte[] bytes=new byte[1024];
    }

    public static void main(String[] args) {
        List<Obj> list = new ArrayList<>();
        System.gc();
        for (int i = 0; i < 100; i++) {
            list.add(new Obj());
        }
        System.gc();
        int i = 0;
    }
}
